<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>

export default {
  name: 'app',
  //刷新
  provide() {
    return {
      reload:this.reload
    }
  },
  //刷新
  data() {
    return {
      isRouterAlive: true
    }
  },
  methods: {
    // 刷新页面方法   别的页面把 inject: ['reload'],导入  在this.reload就可以调用了
    reload() {
      this.isRouterAlive = false
      this.$nextTick(() => this.isRouterAlive = true)
    }
  },
}
</script>

<style>
html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  min-width: 1366px;
  /*点击时去除高亮*/
  -webkit-tap-highlight-color: transparent;
  /*background: white;*/
}
</style>
